var app = getApp()
Page({
  data: {
    orderDetail: [],
    createdDate: '',
    arrivalDate: ''
  },
  onLoad: function (options) {
    var _this = this
    wx.request({
      url: 'https://cake.cindata.cn/opportunity/getOpportunityDetailById',
      data: {
        id: options.id,
        openId: app.globalData.openId
      },
      method: 'POST',
      header: {
        'content-type': 'application/json'
      },
      complete: function complete(res) {
        if (res.statusCode == 200) {
          _this.setData({
            orderDetail: res.data.opportunity,
            createdDate: res.data.createdDate,
            arrivalDate: res.data.arrivalDate
          })
        } else {
          console.log("获取订单详情失败，请稍后重试！");
        }
      }
    });
  }
})